#ifndef __BSP_KEY_H__
#define __BSP_KEY_H__

#ifdef	__cplusplus
extern "C" {	/* allow C++ to use these headers */
#endif	/* __cplusplus */
#include <stdint.h>
#include "ingsoc.h"


#define KEY_L_SHORT_PRESS	    (1<<0)	
#define KEY_L_LONG_PRESS	    (1<<1)	
#define KEY_R_SHORT_PRESS	    (1<<2)		
#define KEY_R_LONG_PRESS	    (1<<3)		
#define KEY_S1_SHORT_PRESS	    (1<<4)		
#define KEY_S1_LONG_PRESS	    (1<<5)	
#define KEY_S2_SHORT_PRESS	    (1<<6)	
#define KEY_S2_LONG_PRESS	    (1<<7)	
#define KEY_K1_SHORT_PRESS	    (1<<8)		
#define KEY_K1_LONG_PRESS	    (1<<9)	
#define KEY_K2_SHORT_PRESS	    (1<<10)	
#define KEY_K2_LONG_PRESS	    (1<<11)	

#define KEY_CHECK(keyState,key) (keyState&key)

extern void key_task_init(void);
extern void setup_peripherals_key(void);
extern uint32_t getKeyState(void);
#ifdef __cplusplus
} /* allow C++ to use these headers */
#endif	/* __cplusplus */

#endif

